/*
 * Copyright (c) 2017年11月08日  by XuanWu Wireless Technology Co., Ltd 
 *             All rights reserved  
 */
package com.zml.fifth;

/**
 * @author <a href="mailto:zhaominglin@wxchina.com">minglin.Zhao</a>
 * @Description 双重锁
 * @Date 2017/11/8
 * @Version 1.0.0
 */
public class Singleton3 {
    private volatile static Singleton3 uniqueInstance;

    private Singleton3() {
    }

    public static Singleton3 getInstance() {
        if (uniqueInstance == null) {
            synchronized (Singleton3.class) {
                if (uniqueInstance == null) {
                    uniqueInstance = new Singleton3();
                }
            }
        }
        return uniqueInstance;
    }
}
